import React, { Component } from 'react';
import { Floordiv } from './comStyled'
import widthPotal from './widthPotal' 
import { withRouter } from 'react-router-dom'

@widthPotal
@withRouter
class Floorbn extends Component {
    handleClick =()=>{
        let { history,to} = this.props
        history.push(to)
    }

    render() {
        let {show} = this.props
        return (
            <Floordiv show = {show} onClick={ this.handleClick }>
                <p>已选<span>1</span>题预计<span>5</span>分钟</p>
                <div>
                <span>{this.props.title}</span>
                </div>
            </Floordiv>
        );
    }
}

export default Floorbn;